class OrderBeautyPart < ActiveRecord::Base
	belongs_to :order_beauty
	belongs_to :part
	belongs_to :part_style

	
	after_create :cal_sub_total

	def cal_sub_total
  	  update_attributes(sub_total: self.qty*self.part.sales_price)
	end
end
